package com.coderdream.chapter07.builder.a4;

public class TextBuilder extends Builder {

	private String buffer = "";

	@Override
	public void makeTitle(String title) {
		buffer += "==================================\n";
		buffer += "『" + title + "』\n";
		buffer += "\n";
	}

	@Override
	public void makeString(String str) {
		buffer += '■' + " " + str + "\n";

	}

	@Override
	public void makeItems(String[] items) {
		for (int i = 0; i < items.length; i++) {
			buffer += "● " + items[i] + "\n";
		}
		buffer += "\n";
	}

	/**
	 * 完成的文件
	 * 
	 */
	@Override
	public Object getResult() {
		buffer += "===================================\n";// 花邊
		return buffer;
	}

}
